package com.breeze.blockchain.mybatis.entity;

import com.breeze.components.mybatis.base.BaseEntity;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 系统访问记录 实体类。
 *
 * @author breeze
 * @since 2024-05-11 23:21:51
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(title = "系统访问记录")
@Table("sys_login_info")
public class LoginInfoDo extends BaseEntity implements Serializable {

  @Serial private static final long serialVersionUID = 1L;

  /** 用户账号 */
  @Schema(title = "用户账号")
  private String username;

  /** 登录IP地址 */
  @Schema(title = "登录IP地址")
  private String ipAddress;

  /** 登录地点 */
  @Schema(title = "登录地点")
  private String loginLocation;

  /** 浏览器类型 */
  @Schema(title = "浏览器类型")
  private String browser;

  /** 操作系统 */
  @Schema(title = "操作系统")
  private String operationSystem;

  /** 登录状态（1成功 0失败） */
  @Schema(title = "登录状态（1成功 0失败）")
  private Integer status;

  /** 提示消息 */
  @Schema(title = "提示消息")
  private String msg;

  /** 访问时间 */
  @Schema(title = "访问时间")
  private LocalDateTime loginTime;
}
